﻿<Window x:Class="AmazonGlacierGUI.UI.Views.DownloadView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:System="clr-namespace:System;assembly=mscorlib"
        xmlns:AmazonGlacier="clr-namespace:AmazonGlacierGUI.Core.Helpers.AmazonGlacier;assembly=AmazonGlacierGUI.Core"
        Title="Download archive(s)" Height="242" Width="569" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" ShowInTaskbar="True">
    <Window.Resources>
        <ObjectDataProvider x:Key="regionEnum"
       MethodName="GetValues" ObjectType="{x:Type System:Enum}">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="AmazonGlacier:AmazonRegionEnum"/>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
    </Window.Resources>
    <Grid Margin="5">
        <StackPanel>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition  Height="20"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="150"></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Row="0" Grid.Column="0" Text="Region"></TextBlock>
                <ComboBox Grid.Row="0" Grid.Column="1" ItemsSource="{Binding Source={StaticResource regionEnum}}"
                          SelectedItem="{Binding Region,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}"
                          ></ComboBox>
            </Grid>
            <Grid Margin="0,5,0,0">
                <Grid.RowDefinitions>
                    <RowDefinition  Height="20"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="150"></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Row="0" Grid.Column="0" Text="Vault name"></TextBlock>
                <StackPanel Grid.Row="0" Grid.Column="1"  Orientation="Horizontal">
                    <TextBox  Text="{Binding VaultName,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}" Width="150" HorizontalAlignment="Left"></TextBox>
                    <Button Content="Browse" Height="21" Width="43" Command="{Binding BrowseVaultCommand}"></Button>
                </StackPanel>
            </Grid>
            <Grid Margin="0,5,0,0">
                <Grid.RowDefinitions>
                    <RowDefinition  Height="20"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="150"></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Row="0" Grid.Column="0" Text="Save to"></TextBlock>
                <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
                    <TextBox Width="277" TextWrapping="NoWrap" Text="{Binding UploadArchiveFilePath,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}"></TextBox>
                    <Button Content="Browse" Height="21" Width="43" Command="{Binding BrowseCommand}"></Button>
                </StackPanel>
            </Grid>
            <Grid  Margin="0,5,0,0">
                <Grid.RowDefinitions>
                    <RowDefinition  ></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="150"></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Select archive(s)" Grid.Column="0"></TextBlock>
                <StackPanel  Grid.Column="1" >
                    <StackPanel Orientation="Horizontal" >
                        <RadioButton  GroupName="archbrowse"  Content="From upload history" IsChecked="True" />
                        <RadioButton  GroupName="archbrowse"  Content="Amazon inventory" Margin="5,0,0,0" />
                        <RadioButton  GroupName="archbrowse"  Content="By Archive id" Margin="5,0,0,0" />
                    </StackPanel>
                    <Button Content="Browse archive" Width="115" HorizontalAlignment="Left" Padding="0" Margin="0,5,0,0"></Button>
                    <ListBox Height="71" Margin="0,5,0,0">
                        
                    </ListBox>
                </StackPanel>
            </Grid>
            <Grid  Margin="0,5,0,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="70"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="123"></ColumnDefinition>
                    <ColumnDefinition Width="27" />
                    <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock Text="Description" Grid.ColumnSpan="2"></TextBlock>
                <TextBox Grid.Column="2" Width="320" TextWrapping="Wrap"  Text="{Binding UploadArchiveDescription,Mode=TwoWay}" HorizontalAlignment="Left"  VerticalAlignment="Stretch" ></TextBox>
            </Grid>
            <StackPanel Orientation="Horizontal" Margin="150,10,0,0">
                <Button Content="Upload"  Height="22" Width="80" VerticalAlignment="Top"  HorizontalAlignment="Left" Command="{Binding UploadCommand}"></Button>
                <Button Content="Close"  Height="22" Width="80" Margin="5,0,0,0" VerticalAlignment="Top"  HorizontalAlignment="Left" Command="{Binding CloseCommand}"></Button>
            </StackPanel>

        </StackPanel>

    </Grid>
</Window>
